import { get } from 'sortablejs';
import request from '/@/utils/request';

/**
 * （不建议写成 request.post(xxx)，因为这样 post 时，无法 params 与 data 同时传参）
 *
 * 登录api接口集合
 */
export function stockManageApi() {
	return {
		getInventory: (data: object) => {
			return request({
				url: '/api/inventory/list',
				method: 'post',
				data,
			});
		},
		createInventor: (data: object) => {
			return request({
				url: '/api/inventory/create',
				method: 'post',
				data,
			});
		},
		// 出入库
		transactionInventor: (data: object) => {
			return request({
				url: '/api/inventory/transaction',
				method: 'post',
				data,
			});
		},
		// 操作记录
		transactionsInventor: (data: object) => {
			return request({
				url: '/api/inventory/transactions',
				method: 'post',
				data,
			});
		},
		// 删除商品
		delete: (data: object) => {
			return request({
				url: 'api/inventory/deleteInventory',
				method: 'post',
				data,
			});
		},
		// 更新商品信息
		updateInventory: (data: object) => {
			return request({
				url: 'api/inventory/update',
				method: 'post',
				data,
			});
		},




	};
}
